<template>
	<view class="table">
		<uni-table ref="table" :loading="loading" border stripe emptyText="暂无更多数据">
			<uni-tr>
				<uni-th style="padding: 5px 0;" width="40" align="center">身份</uni-th>
				<uni-th style="padding: 5px 0;" width="70" align="center">账号</uni-th>
				<uni-th style="padding: 5px 0;" width="60" align="center">昵称</uni-th>
				<uni-th style="padding: 5px 0;" width="90" align="center">时间</uni-th>

			</uni-tr>
			<uni-tr v-for="(item, index) in tableData" :key="index">
				<uni-td style="padding: 5px 0;" align="center">{{ item.roleName }}</uni-td>
				<uni-td style="padding: 5px 0;" align="center">{{ item.userName }}</uni-td>
				<uni-td style="padding: 5px 0;" align="center">{{ item.nickName }}</uni-td>
				<uni-td style="padding: 5px 0;" align="center">{{ item.createTime }}</uni-td>
			</uni-tr>
		</uni-table>
	</view>
</template>

<script>
	import {
		teamMember
	} from '@/api/team'
	export default {
		data() {
			return {
				loading: false,
				tableData: []
			}
		},
		onLoad() {
			teamMember().then(res => {
				this.tableData = res.data
				// console.log(this.tableData)
			})
		}
	}
</script>

<style>
	.table {
		margin: 10rpx;
		border-radius: 10rpx;
	}
</style>